/**
 * @张城龙
 * 2017/9/1
 */
 var manageCheck = {
		
	//点击确定触发的事件
	init: function() {
		// 获取申请表主键ID
		var applicationID = $("#modal1").attr("data-applicationID");
		// 审核状态s
		var applyStatus = $("#modal1").attr("data-applyStatus");
		if(applyStatus == 3) {
			$("#modal1").append("<a href='javascript:;'onclick='apply1()'" +
					"class='btn btn-primary btn-single btn-sm pull-right' style='margin-left:10px'>拒绝申请</a><a href='javascript:;'onclick='apply2()'" +
					"class='btn btn-primary btn-single btn-sm pull-right'>通过审核</a>");
		}
	},
	
	//进行审核
	check: function() {
		var content = $.trim($("#content").val());
		console.log(content);
		if(content.length == 0) {
			alert("请输入审批理由！");
			return false;
		}else {
			return true;
		}
		
	},
	
	// 拒绝审核
	refusecheck: function() {
		var refusecontent = $.trim($("#refusecontent").val());
		if(refusecontent.length == 0) {
			alert("请输入审批理由！");
			return false;
		}else {
			return true;
		}
		
	}
	
 }
 
 //入口
 $(function(){
	 manageCheck.init();
 });